jsx3.Class.defineClass(
        "tibco.admin.monitormanage.uicomponents.text.serviceAssemblyInfo.ServiceAssemblyInfo", //the full name of the class to create
        jsx3.gui.Block, //  extends
        null, // implements
        function (plugin) {

            plugin.prototype.init = function() {
                this.jsxsuper();
            }
            
            plugin.prototype.getNamespace = function() {
               return "tibco.admin";
            }
            
            plugin.prototype.setUpComponent = function() {
            	var subject = tibco.admin.monitormanage.uicomponents.page.deployment.Deployment.serviceAssemblyInfoCacheSubject;
            	tibco.admin.monitormanage.general.PageBusUtils.subscribe(subject, this.handleDisplayScreen, this);
            }
            
            plugin.prototype.handleDisplayScreen = function(subject, message, infoObj) {
            	infoObj.loadContent(infoObj);
            }
            
            plugin.prototype.loadContent = function(infoObj) {
           		var serviceAssemblyInfoDoc = tibco.admin.Main.getServer().Cache.getDocument(tibco.admin.monitormanage.uicomponents.page.deployment.Deployment.serviceAssemblyInfoCacheId);
       		 	if(serviceAssemblyInfoDoc)
       		 	{
           			infoObj.contentLoaded = true;
           			var MMUtilsNS = tibco.admin.monitormanage.general.MonitorManageUtils;
					
           			var record = serviceAssemblyInfoDoc.getFirstChild();
           			
           			var nameValueField = infoObj.getDescendantOfName("svcAsmblyNameValue_MM_dply");
           			nameValueField.setText(record.getAttribute("name"));

           			var descriptionValueField = infoObj.getDescendantOfName("svcAsmblyDescriptionValue_MM_dply");
           			descriptionValueField.setText(record.getAttribute("description"));

           			var dateDeployedValueField = infoObj.getDescendantOfName("svcAsmblyDateDeployedValue_MM_dply");
           			dateDeployedValueField.setText(record.getAttribute("dateDeployed"));

           			var deployedByValueField = infoObj.getDescendantOfName("svcAsmblyDeployedByValue_MM_dply");
           			deployedByValueField.setText(record.getAttribute("deployedBy"));

           			var statusValueField = infoObj.getDescendantOfName("svcAsmblyStatusValue_MM_dply");
				var statusVal = record.getAttribute("status");
				statusVal = MMUtilsNS.handleSAStatusExternalization(statusVal);
           			statusValueField.setText(statusVal);

           			var deployableValueField = infoObj.getDescendantOfName("svcAsmblyDeployableValue_MM_dply");
				var deployableVal = record.getAttribute("deployability");
				deployableVal = MMUtilsNS.handleSASyncStatusExternalization(deployableVal);
           			deployableValueField.setText(MMUtilsNS.formatStatusMessage(deployableVal));
           			//deployableValueField.repaint();
					infoObj.repaint();
            	}
            }

        });